<?php
// +----------------------------------------------------------------------
// | snake
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2022 http://baiyf.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: NickBai <1902822973@qq.com>
// +----------------------------------------------------------------------
namespace app\common\model;

use think\Model;

class AuthGroup extends BaseModel
{
    public $createTime = false;
    public $updateTime = false;
    public $softDel = false; //时间类型的软删除

    /**
     *  初始化模型
     * @access protected
     * @return void
     */
    protected function initialize()
    {
        $this->setOperationBtns([
            'text' => '设置权限',
            'type' => 'btn',
            'href' => url('access'),
            'var' => 'id',
            'tip' => '提醒',
        ]);

        parent::initialize();
    }

    public function getTableFieldsComment(){
        return [
            [
                $this->commentFieldName => '{"disc":"分组ID","name":"id","type":"hidden","type_value_custom":null,"type_value":[],"show":{"list":{"checked":false,"cv":""},"add":{"checked":true,"cv":""},"edit":{"checked":true,"cv":""},"view":{"checked":false,"cv":""}},"validate":{"require":false},"isSearch":false,"search":{"text":"","op":"="}}'
            ],
            [
                $this->commentFieldName => '{"disc":"人员类别名称","name":"title","type":"text","type_value_custom":null,"type_value":[],"show":{"list":{"checked":true,"cv":""},"add":{"checked":true,"cv":""},"edit":{"checked":true,"cv":""},"view":{"checked":true,"cv":""}},"validate":{"require":false},"isSearch":false,"search":{"text":"","op":"="}}'
            ],
            [
                $this->commentFieldName => '{"disc":"状态","name":"status","type":"select","type_value_custom":null,"type_value":[{"text":"正常","id":"1"},{"text":"禁用","id":"2"}],"show":{"list":{"checked":true,"cv":""},"add":{"checked":true,"cv":""},"edit":{"checked":true,"cv":""},"view":{"checked":true,"cv":""}},"validate":{"require":false},"isSearch":false,"search":{"text":"","op":"="}}'
            ],
        ];
    }

    public function getTableComment(){
        return '';
    }
}